/*
	Given a size step N, Fill a vector of equally distributed random sampling i+1/2 / N, i=0.. N-1
*/


#if !defined(_Trivial_Generator_)
#define _UniformEquallySpacedGenerator_
#include <src/miscellaneous/OS_basic.h>
#include <src/algorithm/random/Generator_Facilities.h>
namespace boost {
namespace random {
/*! Trivial Generator
	given a vector$ \{x_i\}_{i=1,..,N}$, it this generator defines the identity operator : it returns at each call

\be
	x_{i^{++}}
\ee
*/
template <class data>
class TrivialGenerator : public Generator_facilities<TrivialGenerator<data> >
 {
 public:
	typedef typename data::value_type				result_type;
	typedef typename data::const_iterator			const_iterator;
	TrivialGenerator( const data& from) : data_(from), it_(data_.begin()){
	};
	result_type operator()() // next sampling
	{
		return *(it_++);
	};
 private : 
	 const_iterator it_;
	 data data_;
 };

}
}

#endif
